package com.cmc.cloud.cmclink.doc.api.document.req;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
/**
 * @author lzp
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class VgmEdiReqDto {

    @Schema(description = "提单号")
    @Length(max = 50, message = "{VgmEdiReqDto.blno.length}")
    private String blNo;

    @Schema(description = "箱号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{VgmEdiReqDto.cntrno.notblank}")
    @Length(max = 12, message = "{VgmEdiReqDto.cntrno.length}")
    private String cntrNo;

    @Schema(description = "港口", requiredMode = Schema.RequiredMode.REQUIRED)
    @Length(max = 5, message = "{VgmEdiReqDto.currentPort.length}")
    @NotBlank(message = "{VgmEdiReqDto.currentPort.notblank}")
    private String currentPort;

    @Schema(description = "重量")
    @NotNull(message = "{VgmEdiReqDto.weight.notNull}")
    private BigDecimal weight;

    @Schema(description = "称重方式")
    @Length(max = 3, message = "{VgmEdiReqDto.typecode.length}")
    @NotBlank(message = "{VgmEdiReqDto.typeCode.notblank}")
    private String typeCode;

    @Schema(description = "称重地点")
    @Length(max = 100, message = "{VgmEdiReqDto.address.length}")
    private String address;

    @Schema(description = "称重时间", example = "yyyy-MM-dd HH:mm")
    private String time;

    @Schema(description = "验证签名")
    @Length(max = 100, message = "{VgmImportReqVO.signature.length}")
    private String signature;

    @Schema(description = "船名")
    @Length(max = 5, message = "{VgmEdiReqDto.vesselCode.length}")
    private String vesselCode;

    @Schema(description = "航次")
    @Length(max = 5, message = "{VgmEdiReqDto.voyage.length}")
    private String voyage;
}
